﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;

namespace BLL.BudgetService
{
    /// <summary>
    /// 查询某个时间段的预算记录
    /// </summary>
    public class QueryBudgetByDateTransaction : QueryBudgetTransaction
    {
        private DateTime beginDate;
        private DateTime endDate;

        public QueryBudgetByDateTransaction(DateTime _BeginDate,DateTime _EndDate)
        {
            beginDate = _BeginDate;
            endDate = _EndDate;
        }

        public IList<T_BudgetObject> Query()
        {
            base.Execute();
            IList<T_BudgetObject> list = new List<T_BudgetObject>();
            list = base.budgets;
            list = list.Where(x => x.Db_BeginDate >= beginDate && x.Db_EndDate<=endDate).ToList();
            return list;
        }
    }
}
